package cn.yunhe.controller;

import cn.yunhe.entity.Field;
import cn.yunhe.service.FieldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class FieldController {
    @Autowired
    @Qualifier("fieldService")
    private FieldService fieldService;


    @RequestMapping("/getAllField")
    public List<Field> getAllField(){
        List<Field> fields =  fieldService.getAllField();
        return fields;
    }

}